import { defineStore } from "pinia";
import { ref, computed } from "vue";
import { listCompetition } from "@/api/competitionmanagement/competition";

export const useCompetitionStore = defineStore("competition", () => {
  // 定义竞赛列表状态
  const competitionList = ref(null);
  const getlistCompetition = async () => {
    const res = await listCompetition();
    competitionList.value = res.rows;
    console.log("竞赛仓库数据", competitionList.value);
    return competitionList.value
  };
  return {
    competitionList,
    getlistCompetition,
  };
});
